<template>
  <div>
    <nav-bar
      :title="title"
      :isShow="false"
      leftText="返回"
    ></nav-bar>
    <van-grid :column-num="2">
      <van-grid-item
        :class="index == 0 ? activeColor : gridColor"
        replace
        icon="certificate"
        text="卡审核"
        :to="{ name: 'Verify', params: {retailer_id: retailer_id}}"
        @click="onClick(0)"
      />
      
      <van-grid-item
        :class="index == 1 ? activeColor : gridColor"
        replace
        icon="orders-o"
        text="已审优惠卡"
        :to="{ name: 'DiscountCardList', params: {retailer_id: retailer_id} }"
        @click="onClick(1)"
      />
      <!-- <van-grid-item
        v-if="wx_staff===1"
        :class="index == 3 ? activeColor : gridColor"
        replace
        icon="scan"
        text="授权销售人员"
        :to="{ name: 'SalerList' }"
        @click="onClick(3)"
      /> -->
    </van-grid>
    <router-view></router-view>
  </div>
</template>

<script>
import NavBar from "@/components/NavBar";
import { mapGetters } from "vuex";

export default {
  name: "DiscountVerify",
  components: {
    NavBar,
  },
  
  props: ["retailer_id"],

  data() {
    return {
      title: this.$route.meta.title,
      index: 0,
      gridColor: "grid-color",
      activeColor: "active-color",
    };
  },

  computed: {
    ...mapGetters(["wx_staff"]),
    nums() {
      return this.wx_staff == 1 ? 4 : 3;
    },
  },
  methods: {
    onClick(index) {
      this.index = index;
    },
  },
  mounted() {},
};
</script>

<style  scoped>
.grid-color {
  color: #1989fa;
}
.active-color {
  color: #ee0a24;
}
</style>